package com.rpc.byNetty;

import com.rpc.mini.HelloService;
import com.rpc.mini.HelloServiceImpl;
import com.rpc.multiRegister.DefaultServiceRegistry;
import com.rpc.multiRegister.RPCException;

/**
 * @author ZhangYongLiang
 * @Date 2021/11/11 18:01
 */
public class TestNettyServer {
    public static void main(String[] args) throws RPCException {
        HelloService helloService = new HelloServiceImpl();
        DefaultServiceRegistry serviceRegistry = new DefaultServiceRegistry();
        serviceRegistry.register(helloService);
        NettyServer nettyServer = new NettyServer();
        nettyServer.start(9999);
    }
}
